package com.dubito.noteapp.domain.model

import androidx.room.Entity
import androidx.room.PrimaryKey
import com.dubito.noteapp.ui.theme.BabyBlue
import com.dubito.noteapp.ui.theme.LightGreen
import com.dubito.noteapp.ui.theme.RedOrange
import com.dubito.noteapp.ui.theme.RedPink
import com.dubito.noteapp.ui.theme.Violet

/**
 * author: LiLiang
 * createTime: 2022/10/7-11:27
 * remark:
 **/
@Entity
data class Note(
    @PrimaryKey(autoGenerate = true)
    val id: Int? = null,
    val title: String,
    val content: String,
    val timestamp: Long,
    val color: Int,
) {
    companion object {
        val noteColors = listOf(RedOrange, LightGreen, Violet, BabyBlue, RedPink)
    }
}

class InvalidNoteException(message: String) : Exception(message)
